<template>
  <div class="panel-body">
    <h2>学生内容</h2>
    <ul class="nav nav-tabs">
      <li>
        <router-link class="list-group-item" active-class="active" to="/student/news">新闻</router-link>
      </li>
      <li>
        <router-link class="list-group-item" active-class="active" to="/student/messages">消息</router-link>
      </li>
    </ul>
    <p>这里会有一个缓存需求，比如方本框写入了数据，在切换路由时，控件被销毁了，数据也就没有了。
    include属性可以指定不销毁的控件（组件）名，不写时，所有控件都不销毁
    </p>
<!--    <keep-alive include="News">-->
    <keep-alive :include="['News','Messages']">
      <router-view ></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: "Student"
}
</script>

<style scoped>

</style>
